package com.mapper;

import com.pojo.Person;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author xiexin
 * @description 针对表【tb_person】的数据库操作Mapper
 * @createDate 2024-11-15 14:03:41
 * @Entity com.pojo.Person
 */
public interface PersonMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Person record);

    int insertSelective(Person record);

    Person selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Person record);
* @description 针对表【tb_person】的数据库操作Mapper
* @createDate 2024-11-15 14:03:41
            * @Entity com.pojo.Person
*/
    public interface PersonMapper {

        int deleteByPrimaryKey(Long id);

        int insert(Person record);

        int insertSelective(Person record);

        Person selectByPrimaryKey(Long id);

        int updateByPrimaryKeySelective(Person record);
* @description 针对表【tb_person】的数据库操作Mapper
* @createDate 2024-11-15 14:03:41
                * @Entity com.pojo.Person
*/
        public interface PersonMapper {

            int deleteByPrimaryKey(Long id);

            int insert(Person record);

            int insertSelective(Person record);

            Person selectByPrimaryKey(Long id);

            int updateByPrimaryKeySelective(Person record);

            int updateByPrimaryKey(Person record);

            @Select("select * from tb_person where id=#{id}")
            @Results(
                    {@Result(column="card_id",property="card",
                            one=@One(select = "com.mapper.IdcardMapper.selectIdCardById"))
                    }
            )
            Person selectPersonById(int id);
        }
